package com.example.games.core;

public class ScreenUtil {

	public final static int DEFAULT_WIDTH = 800;

	public final static int DEFAULT_HEIGHT = 480;

	public final static int CELL_NUMS_W = 8;

	public final static int CELL_NUMS_H = 4;

	public static int getCellX() {
		return getScreenX(80);
	}

	public static int getCellY() {
		return getScreenY(60);
	}

	public static int getCellWH() {
		return 80;
	}

	/**
	 * 根据当前手机屏幕适配坐标x
	 * 
	 * @param xIn800
	 *            x坐标在800宽中位置
	 * @return
	 */
	public static int getScreenX(int xIn800) {
		return xIn800 * GameHelper.getScreenWidth() / DEFAULT_WIDTH;
	}

	public static int getScreenY(int yIn480) {
		return yIn480 * GameHelper.getScreenHeight() / DEFAULT_HEIGHT;
	}
}
